package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.TreatmentRecord;
import com.antdesignbackend.backend.entity.entityVo.TreatmentRecordVo;
import com.antdesignbackend.backend.mapper.TreatmentRecordMapper;
import com.antdesignbackend.backend.service.TreatmentRecordService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TreatmentRecordServiceImpl extends ServiceImpl<TreatmentRecordMapper, TreatmentRecord> implements TreatmentRecordService {
    @Autowired
    TreatmentRecordMapper treatmentRecordMapper;
    @Override
    public List<TreatmentRecordVo> search(@Param(Constants.WRAPPER) QueryWrapper<TreatmentRecordVo> treatmentRecordVoQueryWrapper, Page<TreatmentRecordVo> treatmentRecordVoPage){
        return treatmentRecordMapper.search(treatmentRecordVoQueryWrapper,treatmentRecordVoPage);
    };
    public Integer count(@Param(Constants.WRAPPER) QueryWrapper<TreatmentRecordVo> treatmentRecordVoQueryWrapper){
        return treatmentRecordMapper.count(treatmentRecordVoQueryWrapper);
    };
}
